#ifndef PICTURECAPTIONWIDGET_H
#define PICTURECAPTIONWIDGET_H

#include <QLabel>
#include <QMouseEvent>
#include <QPixmap>
#include <QVBoxLayout>
#include <QWidget>

#include "tooltype.h"

class PictureCaptionWidget : public QWidget
{
    Q_OBJECT
public:
    explicit PictureCaptionWidget(ToolType toolType,
                                  const QPixmap &image,
                                  const QString &title,
                                  const QString &description,
                                  QWidget *parent = nullptr);

signals:
    void clicked(ToolType toolType);

protected:
    void paintEvent(QPaintEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void enterEvent(QEvent *event) override;
    void leaveEvent(QEvent *event) override;

private:
    ToolType m_toolType;
    QLabel *m_imageLabel;
    QLabel *m_titleLabel;
    QLabel *m_descriptionLabel;
    bool m_isHovered;
};

#endif // PICTURECAPTIONWIDGET_H
